/*
 * FavoritesItem.cpp
 *
 *  Created on: 2014年10月11日
 *      Author: Administrator
 */

#include "FavoritesItem.hpp"

FavoritesItem::FavoritesItem()
{
}

FavoritesItem::FavoritesItem(const QString &id, const QString &title, const QString &url, const QString &content)
    : m_id(id)
    , m_title(title)
    , m_url(url)
    , m_content(content)
{
}

QString FavoritesItem::id() const
{
    return m_id;
}

QString FavoritesItem::title() const
{
    return m_title;
}

QString FavoritesItem::url() const
{
    return m_url;
}

QString FavoritesItem::content() const
{
    return m_content;
}

void FavoritesItem::setId(const QString &newId)
{
    if (newId != m_id) {
        m_id = newId;
        emit idChanged(newId);
    }
}

void FavoritesItem::setTitle(const QString &newTitle)
{
    if (newTitle != m_title) {
        m_title = newTitle;
        emit titleChanged(newTitle);
    }
}
void FavoritesItem::setUrl(const QString &newUrl)
{
    if (newUrl != m_url) {
        m_url = newUrl;
        emit urlChanged(newUrl);
    }
}

void FavoritesItem::setContent(const QString &newContent)
{
    if (newContent != m_content) {
        m_content = newContent;
        emit contentChanged(newContent);
    }
}

